// Copyright 2006 PR1ME. All Rights Reserved.

public class FileCluster extends Cluster {

  public FileCluster(String descriptor, CorpusFile[] files) {
    super(descriptor);
    this.files = files;
  }

  public CorpusFile getCorpusFile(int index) {
    if (index < 0 || index >= files.length) {
      return null;
    }
    return files[index];
  }

  public String[] getItems() {
    String[] results = new String[files.length];
    for (int i = 0; i < files.length; ++i) {
      results[i] = files[i].getFilePath();
    }
    return results;
  }

  public SuperCluster isSuperCluster() {
    return null;
  }

  private final CorpusFile[] files;

}
